using Newtonsoft.Json;
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GuXin.Entity.AppEnum;
using GuXin.Entity.SystemModels;

namespace GuXin.Entity.DomainModels
{
    [Table("Sys_User")]
    [Entity(ApiInput = typeof(ApiSys_UserInput), ApiOutput = typeof(ApiSys_UserOutput))]
    public class Sys_User : BaseEntity
    {
        /// <summary>
        ///用户名
        /// </summary>
        [Display(Name = "用户名")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(20)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string UserName { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Key]
        [Display(Name = "User_Id")]
        [Column(TypeName = "int")]
        [Required(AllowEmptyStrings = false)]
        public int User_Id { get; set; }

        /// <summary>
        ///性别
        /// </summary>
        [Display(Name = "性别")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? Gender { get; set; }

        /// <summary>
        ///头像
        /// </summary>
        [Display(Name = "头像")]
        [MaxLength(400)]
        [Column(TypeName = "nvarchar(400)")]
        [Editable(true)]
        public string Avatar { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Display(Name = "Dept_Id")]
        [Column(TypeName = "int")]
        public int? Dept_Id { get; set; }

        /// <summary>
        ///部门
        /// </summary>
        [Display(Name = "部门")]
        [MaxLength(300)]
        [Column(TypeName = "nvarchar(300)")]
        [Editable(true)]
        public string DeptName { get; set; }

        /// <summary>
        ///角色
        /// </summary>
        [Display(Name = "角色")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int Role_Id { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Display(Name = "RoleName")]
        [MaxLength(300)]
        [Column(TypeName = "nvarchar(300)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string RoleName { get; set; }

        /// <summary>
        ///Token
        /// </summary>
        [Display(Name = "Token")]
        [MaxLength(1000)]
        [Column(TypeName = "nvarchar(1000)")]
        [Editable(true)]
        public string Token { get; set; }

        /// <summary>
        ///登陆设备类型
        /// </summary>
        [Display(Name = "登陆设备类型")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? AppType { get; set; }

        /// <summary>
        ///用户昵称
        /// </summary>
        [Display(Name = "用户昵称")]
        [MaxLength(40)]
        [Column(TypeName = "nvarchar(40)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string NickName { get; set; }

        /// <summary>
        ///密码
        /// </summary>
        [Display(Name = "密码")]
        [MaxLength(400)]
        [JsonIgnore]
        [Column(TypeName = "nvarchar(400)")]
        public string UserPwd { get; set; }

        /// <summary>
        ///注册时间
        /// </summary>
        [Display(Name = "注册时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? CreateDate { get; set; }


        /// <summary>
        ///手机号
        /// </summary>
        [Display(Name = "手机号")]
        [MaxLength(22)]
        [Column(TypeName = "nvarchar(22)")]
        public string PhoneNo { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Display(Name = "Tel")]
        [MaxLength(40)]
        [Column(TypeName = "nvarchar(40)")]
        public string Tel { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Display(Name = "CreateID")]
        [Column(TypeName = "int")]
        public int? CreateID { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(400)]
        [Column(TypeName = "nvarchar(400)")]
        [Editable(true)]
        public string Creator { get; set; }

        /// <summary>
        ///是否可用
        /// </summary>
        [Display(Name = "是否可用")]
        [Column(TypeName = "tinyint")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public UserStatus Enable { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Display(Name = "ModifyID")]
        [Column(TypeName = "int")]
        public int? ModifyID { get; set; }

        /// <summary>
        ///修改人
        /// </summary>
        [Display(Name = "修改人")]
        [MaxLength(400)]
        [Column(TypeName = "nvarchar(400)")]
        public string Modifier { get; set; }

        /// <summary>
        ///修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        public DateTime? ModifyDate { get; set; }

        /// <summary>
        ///审核状态
        /// </summary>
        [Display(Name = "审核状态")]
        [Column(TypeName = "int")]
        public int? AuditStatus { get; set; }

        /// <summary>
        ///审核人
        /// </summary>
        [Display(Name = "审核人")]
        [MaxLength(400)]
        [Column(TypeName = "nvarchar(400)")]
        public string Auditor { get; set; }

        /// <summary>
        ///审核时间
        /// </summary>
        [Display(Name = "审核时间")]
        [Column(TypeName = "datetime")]
        public DateTime? AuditDate { get; set; }

        /// <summary>
        ///最后登陆时间
        /// </summary>
        [Display(Name = "最后登陆时间")]
        [Column(TypeName = "datetime")]
        [Required(AllowEmptyStrings = false)]
        public DateTime LastLoginDate { get; set; }

        /// <summary>
        ///最后密码修改时间
        /// </summary>
        [Display(Name = "最后密码修改时间")]
        [Column(TypeName = "datetime")]
        public DateTime? LastModifyPwdDate { get; set; }

        /// <summary>
        ///地址
        /// </summary>
        [Display(Name = "地址")]
        [MaxLength(400)]
        [Column(TypeName = "nvarchar(200)")]
        [Editable(true)]
        public string Address { get; set; }

        /// <summary>
        ///电话
        /// </summary>
        [Display(Name = "电话")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(200)")]
        [Editable(true)]
        public string Mobile { get; set; }

        /// <summary>
        ///Email
        /// </summary>
        [Display(Name = "Email")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(200)")]
        [Editable(true)]
        public string Email { get; set; }

        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(400)]
        [Column(TypeName = "nvarchar(400)")]
        [Editable(true)]
        public string Remark { get; set; }

        /// <summary>
        ///排序号
        /// </summary>
        [Display(Name = "排序号")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? OrderNo { get; set; }
        /// <summary>
        /// 省份
        /// </summary>
        [Editable(true)]
        [Column(TypeName = "nvarchar(10)")]
        public string Province { get; set; }
        /// <summary>
        /// 城市
        /// </summary>
        [Editable(true)]
        [Column(TypeName = "nvarchar(10)")]
        public string City { get; set; }

        /// <summary>
        /// 用户内容列表
        /// </summary>
        //public IList<Content> Contents { get; set; }
    }
}
